﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/HomeAdmin.Master" AutoEventWireup="true" CodeBehind="AddProducer.aspx.cs" Inherits="DigitalAnts.Admin.AddProducer" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div align="center">
    <asp:Label ID="lbl_addupt" runat="server" Text="" Font-Size="30px"></asp:Label>
    <table>
        <tr>
            <td>&nbsp;</td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator7" 
                ControlToValidate="txt_producer" runat="server" 
                ValidationExpression="^[\s\S]{1,49}$" Text="Tên hãng xe: 1-49 Ký Tự" 
                SetFocusOnError="true" Display="Dynamic" ValidationGroup="reg" /></td>
            <td align="center">
                &nbsp;</td>
        </tr>
        <tr>
            <td>Tên Hãng Xe</td>
            <td>
                <asp:TextBox ID="txt_producer" runat="server"></asp:TextBox></td>
            <td align="center">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="txt_producer" ErrorMessage="*" ValidationGroup="txt"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="center">
                <asp:Label ID="lblname" runat="server" Text="" ForeColor="Red"></asp:Label>
            </td>
            <td align="center">
                &nbsp;</td>
        </tr>
        <tr>
            <td>Thông tin</td>
            <td>
                <asp:TextBox ID="txt_description" runat="server"></asp:TextBox></td>
            <td align="center">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                ControlToValidate="txt_description" ErrorMessage="*" ValidationGroup="txt"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator8" 
                ControlToValidate="txt_description" runat="server" 
                ValidationExpression="^[\s\S]{1,500}$" Text="Thông tin: 1-500 Ký Tự" 
                SetFocusOnError="true" Display="Dynamic" ValidationGroup="reg" /></td>
            <td align="center">
                &nbsp;</td>
        </tr>
        <tr>
            <td>Logo</td>
            <td>
                <asp:FileUpload ID="ful_image" runat="server" />
            </td>
            <td><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="ful_image"
                ErrorMessage="Không đúng định dạng hình" Display="Dynamic"
                ValidationExpression=
                "^([0-9a-zA-Z_\-~ :\\])+(.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$">
                </asp:RegularExpressionValidator> </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Label ID="lbl_mess" runat="server" Text="" ForeColor="Red"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btt_add" runat="server" Text="Submit" 
                    onclick="btt_add_Click" ValidationGroup="txt"/>
            </td>
        </tr>
    </table>
    <asp:GridView ID="gv_producer" runat="server" EnableModelValidation="True" 
        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
        GridLines="None" AllowPaging="True" 
        onpageindexchanging="gv_producer_PageIndexChanging">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="colProducerID" 
                DataNavigateUrlFormatString="~\Admin\AddProducer.aspx?ProducerID={0}" 
                HeaderText="Edit" Text="Edit" />
            <asp:BoundField DataField="colProducer" HeaderText="ProductName" />
            <asp:BoundField DataField="colDescription" HeaderText="Description" />
            <asp:BoundField DataField="colAvatar" HeaderText="Avatar" />
            <asp:HyperLinkField DataNavigateUrlFields="colProducerID" 
                DataNavigateUrlFormatString="~\Admin\ShowProducer.aspx?ProducerID={0}" 
                HeaderText="Show" Text="Show" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    </asp:GridView>
    </div>
</asp:Content>
